﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using VRacer;

namespace VRacer.Pages
{
    /// <summary>
    /// Interaction logic for MultiplayerPreferences.xaml
    /// </summary>
    public partial class MultiplayerPreferences : Page
    {
        public MultiplayerPreferences()
        {
            InitializeComponent();
        }

        private void Button_Click_AddNewPlayer(object sender, RoutedEventArgs e)
        {
            Business.Instance.Game.Add(new HumanPlayer());
        }

        private void Button_Click_RemoveSelectedPlayer(object sender, RoutedEventArgs e)
        {
            Business.Instance.Game.Remove((PlayerBase)(sender as FrameworkElement).DataContext);
        }

        private void _startGameButton_Click(object sender, RoutedEventArgs e)
        {
            NavigationService.Navigate(new Uri(@"Pages/Game.xaml", UriKind.Relative));
        }

        private void Button_Click_AddNewAIPlayer(object sender, RoutedEventArgs e)
        {
            Business.Instance.Game.Add(new AIPlayer(Business.Instance.Game));
        }
    }
}
